package com.jeehentor.generate.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 表单配置主表
 * </p>
 *
 * @author wzd
 * @since 2024-05-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_gen_form")
@Schema(description="表单配置主表")
public class SysGenForm implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @Schema(description = "表单名称")
    private String formName;

    @Schema(description = "模型id")
    private String modelId;

    @Schema(description = "表单全局css")
    private String cssCode;

    @Schema(description = "自定义css样式")
    private String customClass;

    @Schema(description = "")
    private String dataSources;

    @Schema(description = "表单全局函数")
    private String functions;

    @Schema(description = "版本")
    private String jsonVersion;

    private String labelAlign;

    private String labelPosition;

    private String labelWidth;

    private String layoutType;

    @Schema(description = "数据对象名称")
    private String modelName;

    @Schema(description = "onFormCreated事件")
    private String onFormCreated;

    @Schema(description = "onFormDataChange事件")
    private String onFormDataChange;

    @Schema(description = "onFormMounted事件")
    private String onFormMounted;

    private String onFormValidate;

    @Schema(description = "引用名称")
    private String refName;

    @Schema(description = "验证规则名称")
    private String rulesName;

    private String size;

    @Schema(description = "创建人")
    private String createBy;

    @Schema(description = "创建日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    private String updateBy;

    @Schema(description = "更新日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


}
